<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
    <a class="navbar-brand" href="<%= root_url %>">QA System </a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item">
                <a class="nav-link" href="<%= Qa.main_app_path %>"> 首页 </a>
            </li>

            <li class='nav-item'>
                <%= link_to new_theme_path(), class: "nav-link" do %>
                    <i class='fas fa-plus'></i> 项目
                <% end %>
            </li>

            <% Qa::Theme.all.each do |theme| %>
                <li class="nav-item">
                    <% if @theme.present? && @theme.id == theme.id %>
                        <%=link_to theme.name, theme, class: 'nav-link qa-theme-select' %>
                    <% else %>
                        <%=link_to theme.name, theme, class: 'nav-link' %>
                    <% end %>
                </li>

            <% end %>
            <li class='nav-item'>
                <a class='nav-link' href="https://danish.dzunion.cn//video/20200425_133125.mp4">如何创建任务?</a>
            </li>
        </ul>
        <form class="form-inline mt-2 mt-md-0" action='<%= search_tasks_path %>' method='GET'>
            <input class="form-control mr-sm-2" name='content' type="text" placeholder="搜索任务" aria-label="Search">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">搜索</button>
        </form>
        <span>         <%= current_user.name %> <i class='fas fa-user'></i>
        </span>
    </div>
</nav>
